﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DTO
{
    public class MaSPMucNhapKhoSLTonDTO
    {
        long maSanPham;
        long soLuongTon;
        long mucNhapKho;

        public MaSPMucNhapKhoSLTonDTO()
        {

        }

        public MaSPMucNhapKhoSLTonDTO(long maSanPham, long soLuongTon, long mucNhapKho)
        {
            this.maSanPham = maSanPham;
            this.soLuongTon = soLuongTon;
            this.mucNhapKho = mucNhapKho;
        }

        public long MaSanPham
        {
            get { return maSanPham; }
            set
            {
                if (value < 0) throw new Exception("Ma san pham < 0");
                maSanPham = value;
            }
        }


        public long SoLuongTon
        {
            get { return soLuongTon; }
            set
            {
                if (value < 0) throw new Exception("So luong ton < 0");
                soLuongTon = value;
            }
        }

        public long MucNhapKho
        {
            get { return mucNhapKho; }
            set
            {
                if (value < 0) throw new Exception("So luong ton < 0");
                mucNhapKho = value;
            }
        }
    }
}
